package com.pcitc.app.model;

import com.pcitc.app.model.BaseObject;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;

import java.io.Serializable;

@Entity
@Table(name="TBL_SUBDOMAIN",schema="XZGD")
public class TblSubdomain extends BaseObject implements Serializable {
    private Long submoduleid;
    private String submodulename;
    private String submoduleaction;
    private String submoduleip;

    @Id  @GeneratedValue(strategy = GenerationType.AUTO)    
    public Long getSubmoduleid() {
        return this.submoduleid;
    }
    
    public void setSubmoduleid(Long submoduleid) {
        this.submoduleid = submoduleid;
    }
    
    @Column(name="SUBMODULENAME", length=256)
    public String getSubmodulename() {
        return this.submodulename;
    }
    
    public void setSubmodulename(String submodulename) {
        this.submodulename = submodulename;
    }
    
    @Column(name="SUBMODULEACTION", length=256)
    public String getSubmoduleaction() {
        return this.submoduleaction;
    }
    
    public void setSubmoduleaction(String submoduleaction) {
        this.submoduleaction = submoduleaction;
    }
    
    @Column(name="SUBMODULEIP", length=256)
    public String getSubmoduleip() {
        return this.submoduleip;
    }
    
    public void setSubmoduleip(String submoduleip) {
        this.submoduleip = submoduleip;
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TblSubdomain pojo = (TblSubdomain) o;

        if (submodulename != null ? !submodulename.equals(pojo.submodulename) : pojo.submodulename != null) return false;
        if (submoduleaction != null ? !submoduleaction.equals(pojo.submoduleaction) : pojo.submoduleaction != null) return false;
        if (submoduleip != null ? !submoduleip.equals(pojo.submoduleip) : pojo.submoduleip != null) return false;

        return true;
    }

    public int hashCode() {
        int result = 0;
        result = (submodulename != null ? submodulename.hashCode() : 0);
        result = 31 * result + (submoduleaction != null ? submoduleaction.hashCode() : 0);
        result = 31 * result + (submoduleip != null ? submoduleip.hashCode() : 0);

        return result;
    }

    public String toString() {
        StringBuffer sb = new StringBuffer(getClass().getSimpleName());

        sb.append(" [");
        sb.append("submoduleid").append("='").append(getSubmoduleid()).append("', ");
        sb.append("submodulename").append("='").append(getSubmodulename()).append("', ");
        sb.append("submoduleaction").append("='").append(getSubmoduleaction()).append("', ");
        sb.append("submoduleip").append("='").append(getSubmoduleip()).append("'");
        sb.append("]");
      
        return sb.toString();
    }

}
